#ifndef CONFIG_FILE_H
#define CONFIG_FILE_H
#include <string>
using std::string;

extern void trim_string( char* str );

class GConfigFile
{
public:
	GConfigFile( const string& strFile );
	
	string get_string_param( const string& strKey, const string& defaultValue = "" );
	double get_double_param( const string& strKey, int defaultValue = 0.0 );
	int get_int_param( const string& strKey, int defaultValue = 0 );
	bool get_bool_param( const string& strKey, bool defaultValue = false );
	
private:
	string get_param( const string& strKey );
	string parse_line(const string& strKey, char* line);

private:
	string m_strFile;
};

#endif
